import util from "../utils/util.js";
//修改密码
function amendPasswdModel(lastPass, pass) {
    const url = util.api.password
    const data = {
        token: util.token,
        passwd: lastPass,
        repasswd: pass
    }
    const method = 'PUT'
    return util.sendRequestFail(url, method, data)
}
//重置密码
function resetPasswdModel(phone, code, pass) {
    const url = util.api.reset
    const method = 'POST'
    const data = {
        token: util.token,
        repasswd: pass,
        phone,
        captcha: code,
        template_id: 10001
    }
    return util.sendRequestFail(url, method, data)
}
export {
    amendPasswdModel,
    resetPasswdModel
}